package p.ithorns.integration.aop.point;

import org.springframework.aop.aspectj.AspectJExpressionPointcutAdvisor;
import org.springframework.beans.factory.annotation.Value;

/**
 * AdvisorConfig
 * TODO ithorns
 *
 * @author Ht.L
 * @date 2024-03-10 13:57
 * @since 1.0.0
 */
//@Configuration
public class AdvisorConfig {

    @Value("$pointcut")
    private String pointcut;

    public AspectJExpressionPointcutAdvisor advisor() {
        AspectJExpressionPointcutAdvisor advisor = new AspectJExpressionPointcutAdvisor();
        advisor.setExpression(pointcut);
        advisor.setAdvice(new LogAdvice());
        return advisor;
    }


}